package com.knowif.enumInfo;

//订单状态 ： 1.未支付 2.已支付 3.失效订单 4.导师接单 5.已交易 6.取消订单 7.退款订单 8. 待评价 9.评论完成
public enum  UserOrderStatusEnum {
    //未支付
    BEGIN(1),

    //已支付
    PAID(2),

    //失效订单
    INVALID(3),

    //导师接单
    ACCEPT(4),

    //已交易
    ALREADY(5),

    //取消订单
    CANCEL(6),

    //退款订单
    REFUND(7),

    //待评价
    COMMENT(8),

    //评论完成
    FINISH(9),
	
	//虚拟订单，用户添加虚拟评论采用的评论
	VIRTUAL(10);

    private int state;

    private UserOrderStatusEnum(int state){
        this.state = state;
    }

    public int getState() {
        return state;
    }

    public static boolean isBegin(int state){
        if(state == BEGIN.state){
            return true;
        }else{
            return false;
        }
    }

    public static boolean isPaid(int state){
        if(state == PAID.state){
            return true;
        }else{
            return false;
        }
    }

    public static boolean isInvalid(int state){
        if(state == INVALID.state){
            return true;
        }else{
            return false;
        }
    }

    public static boolean isAccept(int state){
        if(state == ACCEPT.state){
            return true;
        }else{
            return false;
        }
    }

    public static boolean isAlready(int state){
        if(state == ALREADY.state){
            return true;
        }else{
            return false;
        }
    }

    public static boolean isCancel(int state){
        if(state == CANCEL.state){
            return true;
        }else{
            return false;
        }
    }
    public static boolean isRefund(int state){
        if(state == REFUND.state){
            return true;
        }else{
            return false;
        }
    }

    public static boolean isComment(int state){
        if(state == COMMENT.state){
            return true;
        }else{
            return false;
        }
    }

    public static boolean isFinish(int state){
        if(state == FINISH.state){
            return true;
        }else{
            return false;
        }
    }



}
